package homework;

public class java04 {
	public static void main(String[] args) {
		int flag1,flag2;
		for(int i=10;i<100000;i++) {
			if(i<100) {
				int a,b;
				a=i/10;
				b=i%10;
				if(a==b)
					System.out.println(i);
			}
			else if(i<1000) {
				int a,b,c;
				a=i/100;
				b=(i%100)/10;
				c=i%10;
				if(a==c)
					System.out.println(i);
			}
			else if(i<10000) {
				int a,b,c,d;
				a=i/1000;
				b=(i%1000)/100;
				c=(i%100)/10;
				d=i%10;
				if(a==d&&b==c)
					System.out.println(i);
			}
			else {
				int a,b,c,d,e;
				a=i/10000;
				b=(i%10000)/1000;
				c=(i%1000)/100;
				d=(i%100)/10;
				e=i%10;
				if(a==e&&b==d)
					System.out.println(i);
			}
		}
	}
}
